package com.heima.controller;

import com.heima.domain.pojo.Logistics;
import com.heima.domain.pojo.Result;
import com.heima.service.LogisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/logistics")
public class LogisticsController {
    @Autowired
    private LogisticsService logisticsService;

    @GetMapping
    public Result getList(){
        List<Logistics> list = logisticsService.list();
        return Result.success(list);
    }
}
